#! /bin/sh
#
#   Examples build helper
#   Syntax: build all | clean
#
#   This controls whether we get debug or release builds
test -z "$BOOM_MODEL" && BOOM_MODEL=debug
VERSION="0.3.0-SNAPSHOT"
JEROMQ="jeromq-$VERSION.jar"
CLASSPATH=".:$JEROMQ"

JZMQ_VERSION="2.1.1-SNAPSHOT"  ## This has to be updated when the lastest version is updated 
JZMQ="jzmq-$JZMQ_VERSION.jar"
JZMQ_CLASSPATH=".:$JZMQ"

if [ /$1/ = /jzmq/ ]; then
    shift
    CLS=$1
    echo "$CLS with jzmq"
    shift
    java -Djava.library.path=/usr/local/lib -cp $JZMQ_CLASSPATH $CLS "$@"
elif [ -f $1.class ]; then
    CLS=$1
    echo "$CLS with jeromq"
    shift
    java -cp $CLASSPATH $CLS "$@"
else
    echo "compile java file first"
fi
